import Router from "koa-router";
import bodyParser from "koa-bodyparser";
import { getC,regC } from "../untils/tool.js";
import cors from '@koa/cors'
let router =new Router();
export const useC=function(app){
    app.use(cors())
    app.use(bodyParser())
    let controllerFiles =getC();
    regC(router,controllerFiles)
    app.use(router.routes())
}